home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3351 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.7 KB

  1. Path: news.lpr.carel.fi!usenet
  2. From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Visual c++ Win32 problem
  5. Date: Tue, 23 Jan 1996 16:37:53 +0200
  6. Organization: Carelcomp Forest
  7. Message-ID: <3104F2C1.270D@cmt.lpr.mail.carel.fi>
  8. References: <4dpq0r$d1c@oznet07.ozemail.com.au>
  9. NNTP-Posting-Host: renoir.cclahti.carel.fi
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b6a (WinNT; I)
  14.  
  15. Michael Pomponio wrote:
  16. > Subject: Visual c++ Win32 Problems
  17. > In Visual c++ v1.5 I wrote an application that calls an windows ftp
  18. > program anf waits until the ftp prgram has finished before continuing. I
  19. > basialled called the ftp like so;
  20. > WinExec("ftp", 4);
  21. > while ( FindWindow(NULL, "ftp") != NULL)
  22. > {
  23. >         Yeild();
  24. > }
  25. > MessageBox("FTP PROGRAM HAS EXITED"):
  26. > When I try to do the same in Visual c++ v2.0 ( running on Win95) It
  27. > doesn't work for 2 reasons, (1) Yield() function no longer exists in
  28. > Win32 and (2) porgrams are executed via a THREAD and a NEW PROCESS (
  29. > bloody multitasking). Does anybody now how I can do what I did in v1.5 in
  30. > v2.0/ Becuase I have read every c++ book in any of Sydneys desent book
  31. > store and they tell nothing about WinExec, createprocess and createthread
  32. > ( that is relevant)..
  33.  
  34. Look at the online help for the functions: CreateProcess, OpenProcess and 
  35. GetExitCodeProcess. These should be what you need, and the online help has quite a 
  36. bit of information about how to use them; which is a little too long to be included 
  37. here. Note: these do not work in 16-bit Windows (what you'd program using VC1.5).
  38.  
  39. HTH,
  40. AriL
  41.  
  42. -- 
  43. All my opinions are mine and mine alone.
  44.